package Level02_one;

public class Teacher extends Person{
    private double salary;
    @Override
    void eat() {
        System.out.println("工资为"+getSalary()+"元的 "+super.getAge()+" 岁的"+super.getName()+"老师在吃工作餐");
    }
    void lecture(){
        System.out.println("工资为"+getSalary()+"元的"+super.getAge()+"岁的"+super.getName()+"老师在讲课");
    }

    public Teacher(int age, String name, double salary) {
        super(age, name);
        this.salary = salary;
    }

    public Teacher(double salary) {
        this.salary = salary;
    }
    public Teacher(){}

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
